package com.hluck.goodweatherapp.location;

import com.baidu.location.BDAbstractLocationListener;
import com.baidu.location.BDLocation;
import com.hluck.goodweatherapp.utils.ToastUtils;

/**
 * @Author： LJH
 * @Time： 2023/12/13
 * @description：
 */
public class MyLocationListener extends BDAbstractLocationListener {

    private static final String TAG = MyLocationListener.class.getSimpleName();

    private LocationCallback callback;

    @Override
    public void onReceiveLocation(BDLocation bdLocation) {
        ToastUtils.showShortToast("MyLocationListener --> onReceiveLocation run!");
        if (callback != null) {
            callback.onReceiveLocation(bdLocation);
        }
    }

    public void setCallback(LocationCallback callback) {
        this.callback = callback;
    }
}
